-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CM] Better readability and maintainability: rename variables, move code to more logical places 🔧 #1227
Conversation
destogl
commented
Dec 18, 2023
- Move 'manage_switch' method and 'do_switch' flag to more appropriate positions.
- Make variable name clearer: rename 'request' to 'controller_name'.
} | ||
|
||
if (controller->is_async()) | ||
{ | ||
async_controller_threads_.at(controller_name)->activate(); | ||
} | ||
} | ||
// All controllers activated, switching done | ||
switch_params_.do_switch = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this changes behaviour, nicht wahr?
I see it was moved into manage_switch()
to the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it should not change behavior, but just put it in a more logical place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually here it might be wrong. Because the "switching" is not (theoretically( finished here if one add something more to the mange_switch
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you said makes sense. It should be at the end of the manage_switch
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
|
||
if (controller->is_async()) | ||
{ | ||
async_controller_threads_.at(controller_name)->activate(); | ||
} | ||
} | ||
// All controllers activated, switching done | ||
switch_params_.do_switch = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you said makes sense. It should be at the end of the manage_switch
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Actually the CI is failing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should remove the auto declaration in 1440.
The code does not compile in the CI for a good reason.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1227 +/- ##
==========================================
- Coverage 48.02% 47.83% -0.19%
==========================================
Files 41 41
Lines 3525 3472 -53
Branches 1912 1887 -25
==========================================
- Hits 1693 1661 -32
- Misses 442 446 +4
+ Partials 1390 1365 -25
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9a1e13a
to
771f4ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!